package 字符串类题目;

import java.util.Scanner;

/**
 * @author zc
 * @version 1.0
 * @date 2021/8/31 17:06
 */
//Java字符串转换成字符数组
    //String ------ char[]
    //https://blog.csdn.net/lettuce_/article/details/79484863
public class Demo1 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String str = scanner.next();
        char[] chars = str.toCharArray();
        for (int i = 0; i <chars.length ; i++) {
            System.out.println(chars[i]);
        }
    }
}
